﻿<%@ Page Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"
    CodeFile="PrescriptionDetail.aspx.cs" Inherits="Page_PrescriptionDetail" Title="" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1"
        PersistenceMethod="Session">
    </data:GridViewSearchPanel>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        DataKeyNames="PrescriptionDetailId" DataSourceID="PrescriptionDetailDataSource1"
        OnRowCommand="GridView1_RowCommand">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFormatString="PrescriptionDetailEdit.aspx?PrescriptionDetailId={0}"
                DataNavigateUrlFields="PrescriptionDetailId" Text="Select" />
            <%-- <asp:BoundField DataField="GRNDetailID" HeaderText="GRNDetailID" SortExpression="GRNDetailID" />--%>
            <asp:BoundField DataField="PrescriptionID" HeaderText="PrescriptionID" SortExpression="PrescriptionID" />
            <asp:BoundField DataField="DrugName" HeaderText="Drug Name" SortExpression="[DrugName]" />
            <asp:BoundField DataField="Unit" HeaderText="Unit" SortExpression="[Unit]" />
            <asp:BoundField DataField="Quantity" HeaderText="Quantity" SortExpression="[Quantity]" />
            <asp:BoundField DataField="UnitPrice" HeaderText="Unit Price" SortExpression="[UnitPrice]" />
            <asp:BoundField DataField="AmountPrice" HeaderText="Amount Price" SortExpression="[AmountPrice]"
                DataFormatString="{0:#,##0}" />
            <asp:BoundField DataField="ExpDate" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="False" HeaderText="Exp Date"
                SortExpression="[ExpDate]" />
            <asp:BoundField DataField="BatchLot" HeaderText="Batch Lot" SortExpression="[BatchLot]" />
            <asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="[Remark]" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:ImageButton ID="btn_Delete" runat="server" CommandName="CustomDelete" CommandArgument='<%#Eval("PrescriptionDetailId") %>'
                        ImageUrl="~/Admin/resources/images/icons/cross_circle.png" OnClientClick="return confirm('Are you sure want to delete?');" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
        <PagerSettings FirstPageText="« First" LastPageText="Last »" NextPageText="Next »"
            PreviousPageText="« Previous" Mode="NumericFirstLast" PageButtonCount="4"></PagerSettings>
        <PagerStyle CssClass="pagination" HorizontalAlign="Right" BackColor="White" ForeColor="#000066" />
        <RowStyle ForeColor="#000066" />
    </asp:GridView>
    <data:PrescriptionDetailDataSource ID="PrescriptionDetailDataSource1" runat="server"
        EnablePaging="True" EnableSorting="True" SelectMethod="GetPaged">
        <DeepLoadProperties Method="IncludeChildren" Recursive="False">
        </DeepLoadProperties>
    </data:PrescriptionDetailDataSource>
    <asp:Button ID="Button1" runat="server" Text="Add New" OnClientClick="javascript:location.href='PrescriptionDetailEdit.aspx'; return false;" />
</asp:Content>
